package com.orhon.smartcampus.modules.student.mm;

import java.util.List;

import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import com.orhon.smartcampus.modules.base.mm.LangMapper;
import com.orhon.smartcampus.modules.student.entity.EclassRecords;
import com.orhon.smartcampus.modules.student.gqlModel.GQLEclassRecords;
import com.orhon.smartcampus.modules.user.mm.UserMapper;

@Mapper(
        uses = {
                LangMapper.class,
                StudentMapper.class,
                EclassMapper.class,
                UserMapper.class
        }
)
public interface EclassRecordssMapper {

    EclassRecordssMapper MAPPER = Mappers.getMapper(EclassRecordssMapper.class);

    //@Mapping(source = "id" , target = "id")
    //@Mapping(source = "xxx" , target = "xxx")
    //@Mapping(ignore = true, target = "school" )
    //@Mapping(ignore = true, target = "grade" )
    //@Mapping(ignore = true, target = "arrives" )
    //@Mapping(ignore = true, target = "building" )
    //@Mapping(ignore = true, target = "unit" )
    @Mapping(ignore = true, target = "originalEclass" )
    //@Mapping(ignore = true, target = "users" )
    @Mapping(source = "users", target = "users" )
    @Mapping(source = "student", target = "student" )
    @Mapping(source = "goEclass", target = "goEclass" )
    GQLEclassRecords toEclassRecords(EclassRecords eclassRecords);


    @InheritConfiguration(name = "toEclassRecords")
    List<GQLEclassRecords> toEclassRecordsList(List<EclassRecords> eclassRecords);



}
